package com.imooc.bilibili.service;

import com.imooc.bilibili.dao.UserFollowingGroupDao;
import com.imooc.bilibili.domain.UserFollowingGroup;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

@Service
public class UserFollowingGroupService {

    @Autowired
    private UserFollowingGroupDao userFollowingGroupDao;


    public UserFollowingGroup getByType(String type) {

        return userFollowingGroupDao.getByType(type);
    }

    public UserFollowingGroup getById(Long id) {

        return userFollowingGroupDao.getById(id);
    }

    public List<UserFollowingGroup> getGroupByUserId(Long userId) {

        return userFollowingGroupDao.getUserAllGroup(userId);
    }

    public void addUserFollowGroups(UserFollowingGroup userFollowingGroup) {

        userFollowingGroupDao.addUserFollowGroups(userFollowingGroup);
    }

    public List<UserFollowingGroup> getUserFollowingGroups(Long userId) {

        return userFollowingGroupDao.getUserFollowingGroups(userId);
    }
}
